package com.nmc.service.dao;


import java.util.List;

import com.nmc.common.BirthStatusEnum;
import com.nmc.service.model.Birth;
import com.nmc.service.model.StatisticsModel;
import com.nmc.service.model.User;

/**
 * Birth Data Access Object (GenericDao) interface.
 *
 */
public interface BirthDao extends GenericDao<Birth, String> {

    
    /**
     * Gets a list of users ordered by the uppercase version of their username.
     *
     * @return List populated list of users
     */
    List<Birth> getBirthList();

    /**
     * Saves a user's information.
     * @param birth the object to be saved
     * @return the persisted birth object
     */
    Birth saveBirth(Birth birth);

    public List<Birth> getHospitalBirthList(int hospitalId);

    public List<Birth> getHospitalBirthListByStatus(int hospitalId, BirthStatusEnum birthStatusEnum, int count);
    /**
     * Get birth list zone wise for the given zoneId
     * @param zoneId
     * @param birthStatusEnum 
     * @param count 
     * @return
     */
    public List<Birth> getZoneBirthListByStatus(int zoneId, BirthStatusEnum birthStatusEnum, int count);
    public List<Birth> getZoneBirthList(Birth birth);

    public List<Birth> searchBirth(Birth birth);
    public List<Birth> searchBirthForAdminUser(Birth birth);

	int getBirthCountForHospital(int hospitalId, int year);
	StatisticsModel getHospitalStatisticsCount(int hospitalId,int months);
	public StatisticsModel getZoneStatisticsCount(int zoneId,int months);
	public void updateDeliveryDetails(String id, Birth birth);
	
	public Birth getBirth(String id);
	public StatisticsModel getMaleFemaleCount(int months);
	public List<Object[]> getZoneMaleFemaleCountByMonths(int zoneId ,int months, String sex);
	public List<Object[]> getHospitalMaleFemaleCountByMonths(int hospitalId ,int months, String sex);
	public List<Object[]> getAllZonesMaleFemaleCounts(int months);
	public StatisticsModel getAllZoneStatisticsCount(int months);
}
